import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/homepage',
    children:[
      {path: '/homepage', component: () => import('@/views/homepage/Homepage.vue')}
    ]
  },
  {path: '/login', component: () => import('@/views/Login.vue')},
  {path: '/register', component: () => import('@/views/Register.vue')},

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
